<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>



<div th:if="${user != null}">
  <div>用户</div>
  <div th:text="${user.getId()}"></div>
  <div th:text="${user.getUserName()}"></div>
  <div th:text="${user.getPassWord()}"></div>
  <div th:text="${user.getRealName()}"></div>
</div>

<div th:if="${user == null}">
  暂无数据
</div>



</body>
</html>